const rp = require('request-promise-native');

let options = {
  method: 'POST',
  uri: 'http://127.0.0.1:3000/api/request',
  headers: {
    'content-type': 'application/json'
  },
  body: {
    method: 'post',
    request_url: 'http://127.0.0.1:8080/jtgzfw/ajax.do?_type=ajax',
    back_url: 'http://125.46.83.205:3030/recv/json',
    request_content: {
      message: 'lianzt'
    },
    request_timeout: 20000
  },
  timeout: 50000,
  json: true // Automatically stringifies the body to JSON
};


rp(options).then((res) =>{
  console.log(`请求 ${options.uri} 返回：`, res);
})
.catch((err) =>{
  console.log(`请求 ${options.uri} 异常：`, err.error);
});

